﻿Imports System.Threading
Imports JPC.Medialibrary.BLL

Partial Class Settings
    Inherits System.Web.UI.Page

    Protected Sub btnUpdateMusicLibrary_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpdateMusicLibrary.Click

        'Dim ts As New ThreadStart(AddressOf MedialibraryManager.PopulateDB)
        Dim ProcessingThread As New Thread(AddressOf MedialibraryManager.UpdateMusicDB)
        ProcessingThread.Priority = ThreadPriority.Lowest
        ProcessingThread.Start()
        Response.Redirect("UpdateMusic.aspx")

    End Sub

    Protected Sub btnCleanMusicLibrary_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCleanMusicLibrary.Click

        MedialibraryManager.CleanMusicDB()
        mpeMusicDBCleaned.Show()

    End Sub
End Class
